import { View, Button, Text, Image } from '@tarojs/components';
import Taro from '@tarojs/taro';
import React, { Component } from 'react';
import * as T from '../types';
import './bankingModule.less';
import actions from '../actions/index';
import { connect } from 'react-redux';
import { store2Props } from '../selectors';
import "taro-ui/dist/style/components/icon.scss";
import leftIcon from '@/assets/image/index/left.png'
import topIcon from '@/assets/image/index/top.png'
import bottomIcon from '@/assets/image/index/bottom.png'

type IBankingProps = T.IProps & T.IBankingProps;
//@ts-ignore
@connect<Partial<IBankingProps>, T.IBankingState>(store2Props, actions)
export default class Info extends Component<Partial<IBankingProps>, T.IBankingState> {
  constructor(props: IBankingProps) {
    super(props);
  }

  render() {
    let {
      main,
      actions: { action },
    } = this.props;
    return (
      <View className="PageIndexBanking">
        <View className='content'>
          {/* <Image className='b_bg' mode="widthFix" src={bgIcon} /> */}
          <View className='t_box'>
            <View className='row'>
              {/* <View
                style={{
                  height: '16px',
                  width: '5px',
                  backgroundColor: '#218CFF',
                  marginRight: '10px',
                }}></View> */}
              <Text className='l_title'>银行金融</Text>
              {/* <Text className='t_border'></Text>
              <Text className='r_title'>稳健理财 长期暖心</Text> */}
            </View>
            <View
              className='row'
              style={{ justifyContent: 'center' }}>
              {/* <Text className='more'>更多</Text>
              <View
                style={{ alignContent: 'center', justifyContent: 'center' }}>
                <Image
                  className='r_img'
                  mode="widthFix"
                  src={rightIcon}
                />
              </View> */}
            </View>
          </View>
          <View className='b_box'>
            <View style={{ flex: 1 }}
              onClick={() => {
                Taro.navigateTo({
                  url: `/pages/package-A/article-detail/index?type=1`
                })
              }}>
              <Image className='m_left' src={leftIcon} />
            </View>
            <View className='r_box'>
              <View
                onClick={() => {
                  Taro.navigateTo({
                    url: `/pages/package-A/article-detail/index?type=0`
                  })
                }}>
                <Image className='m_right' src={topIcon} />
              </View>
              <View
                onClick={() => {
                  Taro.navigateTo({
                    url: `/pages/package-A/article-detail/index?type=2`
                  })
                }}>
                <Image className='m_right' src={bottomIcon} />
              </View>
            </View>
          </View>
        </View>
      </View>
    );
  }
}

//create by moon https://github.com/creasy2010/moon
